package io.github.kevinzhwl.edgetts.error;

import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class EdgeErrorException extends Exception {
  private static final long serialVersionUID = -6357149550353160810L;
  private static final int DEFAULT_ERROR_CODE = -99;
  private final int errorCode;
  private final String message;

  public EdgeErrorException(String message) {
    this(DEFAULT_ERROR_CODE, message);
  }

  public EdgeErrorException(Throwable throwable) {
    this(DEFAULT_ERROR_CODE, throwable.getMessage());
  }
}
